home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 March / Ahoy_Magazine_86-03_1986_Double_L.d64 / edge wedge (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  813b  |  37 lines

  1. 10 rem  problem #23-1 :
  2. 20 rem    edge wedge
  3. 30 rem
  4. 97 rem
  5. 98 rem  solution by james e. killman
  6. 99 rem
  7. 100 input"enter string #1";s$
  8. 110 l=len(s$)
  9. 120 for j=1 to l:poke 214,peek(214)-1
  10. 130 print tab(40-len(right$(s$,j)))right$(s$,j)
  11. 140 next
  12. 197 rem
  13. 198 rem  solution by russell k. prater
  14. 199 rem
  15. 200 input"output to 1[146] screen or 2[146] printer   1[157][157][157]";p$
  16. 210 d=val(p$)+2:ifd<>3thenifd<>4goto200
  17. 220 input"enter string #2";s$:open4,d
  18. 230 w=40 : ifd=4 then w=80
  19. 240 forj=1 to len(s$)
  20. 250 print#4,spc(w-j)right$(s$,j);
  21. 260 next : print#4 : close4
  22. 297 rem
  23. 298 rem  solution by robert r. donlon
  24. 299 rem
  25. 300 input"string #3";s$ : l=len(s$)
  26. 310 for x=0tol-1:b$=mid$(s$,l-x,l)
  27. 320 print spc(39-x);b$;
  28. 330 next
  29. 397 rem
  30. 398 rem  solution by john k. lunde
  31. 399 rem
  32. 400 input"printer/screen (p/s)";p$:on-(p$<>"p"andp$<>"s")goto 400
  33. 410 input"string #4";s$ : if p$="p"then open4,4:cmd4
  34. 420 l=len(s$):forx=1tol:z$=z$+" ":next
  35. 430 for x=0tol-1:print right$(z$+mid$(s$,l-x),l):next
  36. 440 get x : sys62255 :rem   close all
  37.